package b3.scene
{
	import b3.util.*;
	import b3.widget.basic.*;
	
	import flash.display.Sprite;
	import flash.filters.*;
	import flash.text.*;

	public class LoadingScene extends BasicScene
	{
		public var loadBar:LoadProgressBar;
		
		public function LoadingScene(showText:String)
		{
			super();
			//LOGO
			var logoSprite:Sprite = new CLogo();
			addChild(logoSprite);
			//进度条
			loadBar = new LoadProgressBar();
			loadBar.x = (BFont.stageWidth - loadBar.width) / 2;
			loadBar.y = 400;
			addChild(loadBar);
			//文字
			var loadText:TextField = new TextField();
        	loadText.autoSize = TextFieldAutoSize.CENTER;
			loadText.defaultTextFormat = new TextFormat("微软雅黑", 22, 0x0088FF);
			loadText.filters = [new GlowFilter(0xFFFFFF, 1, 1.3, 1.3, 100, BitmapFilterQuality.HIGH)];
			loadText.selectable = false;
			loadText.text = showText;
			loadText.x = (BFont.stageWidth - loadText.width) / 2;
			loadText.y = 520;
			addChild(loadText);

			var gradientGlow:GradientGlowFilter = new GradientGlowFilter();
			gradientGlow.distance = 0;
			gradientGlow.angle = 45;
			gradientGlow.colors = [0xFFFFFF, 0xFFFFFF];
			gradientGlow.alphas = [0, 1];
			gradientGlow.ratios = [0, 255];
			gradientGlow.blurX = 130;
			gradientGlow.blurY = 130;
			gradientGlow.strength = 3;
			gradientGlow.quality = BitmapFilterQuality.HIGH;
			gradientGlow.type = BitmapFilterType.OUTER;
			loadBar.filters = [gradientGlow];
		}
		
	}
}